package com.dd.cloud.user.entity.patient;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.dd.cloud.common.annotate.FileSuffix;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 患者用户
 * </p>
 *
 * @author czg
 * @since 2023-07-07
 */
@Data
@EqualsAndHashCode
@Accessors(chain = true)
@Table(comment = "患者用户表")
public class PatientUser implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 数据表说明:患者用户表
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Column(isKey = true, isAutoIncrement = true)
    private Integer id;

    /**
     * 管理员昵称
     */
    @Column(length = 20, comment = "患者昵称")
    private String nickName;

    /**
     * 手机号码
     */
    @Column(length = 20, comment = "手机号码")
    private String mobileNumber;

    /**
     * 密码
     */
    @Column(length = 64, comment = "密码")
    private String password;

    /**
     * 密码盐值
     */
    @Column(length = 64, comment = "密码盐值")
    private String salt;

    /**
     * 头像图片地址
     */
    @Column(length = 500, comment = "头像图片地址")
    @FileSuffix
    private String avatar;

    /**
     * 状态 1正常使用 -1删除 3禁用
     */
    @Column(comment = "状态 1正常使用 -1删除 3禁用")
    private Integer status;

    /**
     * 创建时间
     */
    @Column(comment = "创建时间", defaultValue = "now()")
    private LocalDateTime createDate;
}
